package ink.charon.novel.entity;

import java.util.Date;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.extension.activerecord.Model;

import java.io.Serializable;

/**
 * 爬虫源表(CrawlSource)表实体类
 *
 * @author Pluto
 * @since 2021-08-16 14:58:10
 */
@SuppressWarnings("serial")
public class SpiderSource extends Model<SpiderSource> {
    //主键
    private Integer id;
    //源站名
    private String sourceName;
    //爬取规则（json串）
    private String spiderRule;
    //爬虫源状态，0：关闭，1：开启
    private Byte sourceStatus;
    //创建时间
    @TableField(fill = FieldFill.INSERT)
    private Date createTime;
    //更新时间
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private Date updateTime;


    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public String getSourceName() {
        return sourceName;
    }

    public void setSourceName(String sourceName) {
        this.sourceName = sourceName;
    }

    public String getSpiderRule() {
        return spiderRule;
    }

    public void setSpiderRule(String spiderRule) {
        this.spiderRule = spiderRule;
    }

    public Byte getSourceStatus() {
        return sourceStatus;
    }

    public void setSourceStatus(Byte sourceStatus) {
        this.sourceStatus = sourceStatus;
    }

    public Date getCreateTime() {
        return createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    /**
     * 获取主键值
     *
     * @return 主键值
     */
    @Override
    protected Serializable pkVal() {
        return this.id;
    }
}
